import {BaseConfig, FieldConfig} from "@/fields/config";

export class TabConfig extends BaseConfig {
  title = "选项卡";
  activeName = '1';
  tabIndex = 1;
  editableTabs = [{
    key: Date.now(),
    title: 'Tab 1',
    name: '1',
    type: '',
    module: '',
    content: ''
  }];
  propsValue = {
    'tab': 'tab'
  }
}

const fieldType = "tab";

export const tabDefine = {
  name:"选项卡",
  icon:"el-icon-files",
  type: fieldType,
  create: () => {
    const config = new TabConfig();
    return new FieldConfig(fieldType, config);
  },
  design: () => import(/* webpackChunkName: "form.comp.all" */ "@/views/fields/designer/tab/index"),
  config: () => import(/* webpackChunkName: "form.comp.all" */ "@/views/fields/common/PropsPanel")
}

